home *** CD-ROM | disk | FTP | other *** search
- {------------------------------DRAW.pxl-------------------------------
- This script lets you draw a variety of graphic shapes by clicking on
- various points in the window.
-
- Sample PiXCL 4.0 application. Code can be re-used.
- --------------------------------------------------------------------}
- Initialize:
- WinGetActive(Windowname$)
- WinVersion(Major,Minor,Build)
- InfoMenu(REMOVE)
- {Establish Default Environment}
-
- Title$ = "Pixcl 4.0 Draw"
- WinTitle(Windowname$,Title$)
- UseCoordinates(PIXEL)
- WinLocate(Title$,20,10,780,560,Res)
- WinShow(Title$,TOPMOST,Res)
-
- Restart:
- UseCoordinates(METRIC)
- UsePen(SOLID,3,0,0,0)
- P_Red = 0
- P_Green = 0
- P_Blue = 0
- UseBrush(SOLID,255,0,0)
- Br_Red = 255
- Br_Green = 0
- Br_Blue = 0
- Current_Fig$ = "&Line"
- Previous_Fig$ = Current_Fig$
- Current_Pen$ = "Blac&k "
- Previous_Pen$ = "Blac&k "
- Current_Brush$ = "&Red"
- Previous_Brush$ = "&Red"
-
- UseBackground(OPAQUE,255,255,255)
- DrawBackground
- DrawLine(0,130,280,130)
-
- Draw_Menu:
- WaitInput(100)
- SetMenu("&Exit!",Exit_proc,
- ENDPOPUP,
- "&Figures",IGNORE,
- "&Line", DR_LINE,
- "&Rectangle",DR_RECTANGLE,
- "&Round Rectangle", DR_ROUNDR,
- "&Ellipse", DR_ELLIPSE,
- "&Pie", DR_PIE,
- "&Arc", DR_ARC,
- "&Chord", DR_CHORD,
- ENDPOPUP,
- "&Brush Color",IGNORE,
- "&White", BRUSH_WHITE,
- "&Gray", BRUSH_GRAY,
- "&Red", BRUSH_RED,
- "&Yellow", BRUSH_YEL,
- "Gree&n", BRUSH_GRN,
- "&Light Blue", BRUSH_LTBLU,
- "&Blue", BRUSH_BLUE,
- "&Pink", BRUSH_PINK,
- "Blac&k", BRUSH_BLACK,
- ENDPOPUP,
- "&Pen Color",IGNORE,
- "&White ", Pen_WHITE,
- "&Gray ", Pen_GRAY,
- "&Red ", Pen_RED,
- "&Yellow ", Pen_YEL,
- "Gree&n ", Pen_GRN,
- "&Light Blue ", Pen_LTBLU,
- "&Blue ", Pen_BLUE,
- "&Pink ", Pen_PINK,
- "Blac&k ", Pen_BLACK,
- ENDPOPUP,
- "&Clear Client Area",Restart,
- ENDPOPUP)
-
- ChangeMenuItem(Current_Fig$,CHECK,temp)
- ChangeMenuItem(Current_Pen$,CHECK,temp)
- ChangeMenuItem(Current_Brush$,CHECK,temp)
-
- {Draw tool boxes}
- Gosub Draw_Boxes
-
- {Highlight the line tool}
- UsePen(SOLID,3,0,0,0)
- UseBrush(NULL,0,0,0)
- Gosub Line_Box
- Box_select=1
-
- {Draw tools}
- UseFont("Arial",0,3,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
- UseBrush(SOLID,255,0,0)
- UsePen(SOLID,2,0,0,0)
-
- DrawText(1,1,"1") {Line 0 - 15}
- DrawLine(3,2,12,8)
- DrawText(11,8,"2")
-
- DrawText(16,1,"1") {Rectangle 15 - 30}
- DrawRectangle(18,3,26,12)
- DrawText(26,12,"2")
-
- DrawText(31,1,"1") {Round Rectangle 30 - 45}
- DrawRoundRectangle(32,3,42,12,3,3)
- DrawText(42,12,"2")
-
- UseBrush(NULL,0,0,0) {Ellipse 45 - 60}
- UsePen(DOT,1,0,0,0)
- DrawText(46,1,"1")
- DrawRectangle(47,3,58,12)
- DrawText(58,12,"2")
- UseBrush(SOLID,255,0,0)
- UsePen(SOLID,2,0,0,0)
- DrawEllipse(47,3,58,12)
-
- UseBrush(NULL,0,0,0) {Pie 60 - 75}
- UsePen(DOT,1,0,0,0)
- DrawText(61,1,"1")
- DrawRectangle(62,3,73,12)
- DrawEllipse(62,3,73,12)
- DrawText(73,12,"2")
- UseBrush(SOLID,255,0,0)
- UsePen(SOLID,2,0,0,0)
- DrawPie(62,3,73,12,73,7,63,3)
- DrawText(73,5,"3")
- DrawText(64,0,"4")
-
- UseBrush(NULL,0,0,0) {Arc 75 - 90}
- UsePen(DOT,1,0,0,0)
- DrawText(77,1,"1")
- DrawRectangle(77,3,88,12)
- DrawEllipse(77,3,88,12)
- DrawText(88,12,"2")
- UseBrush(SOLID,255,0,0)
- UsePen(SOLID,2,0,0,0)
- DrawArc(77,3,88,12,88,7,77,3)
- DrawText(88,5,"3")
- DrawText(79,0,"4")
-
- UseBrush(NULL,0,0,0) {Chord 90 - 105}
- UsePen(DOT,1,0,0,0)
- DrawText(91,1,"1")
- DrawRectangle(92,3,103,12)
- DrawEllipse(92,3,103,12)
- DrawText(103,10,"2")
- UseBrush(SOLID,255,0,0)
- UsePen(SOLID,2,0,0,0)
- DrawChord(92,3,103,12,103,7,93,3)
- DrawText(103,5,"3")
- DrawText(94,0,"4")
-
- {Reset the font}
- UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
-
- {Line}
- Dr_Line:
- Current_Fig$="&Line"
- Gosub Check_Figure
- If Must_Redraw <> 1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,line2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the beginning of the line")
- WaitInput()
- line2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,line_end,pos_x1,pos_y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on the end point of the line")
- WaitInput()
- line_end:
- GoSub Draw_Hit_1
- DrawLine(pos_x,pos_y,pos_x1,pos_y1)
- Must_Redraw=0
- Goto Dr_Line
-
-
- {Rectangle}
- dr_rectangle:
- rec_type = 0
- Current_Fig$="&Rectangle"
- goto dr_rect
-
- {Round Rectangle}
- dr_roundr:
- rec_type = 1
- Current_Fig$ = "&Round Rectangle"
-
- Dr_rect:
- Gosub Check_Figure
- If Must_Redraw<>1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,rectangle2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the upper-left corner of the rectangle")
- WaitInput()
- rectangle2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,rect_end,pos_x1,pos_y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on the lower-right corner of the rectangle")
- WaitInput()
- rect_end:
- GoSub Draw_Hit_1
- If rec_type = 0 Then DrawRectangle(pos_x,pos_y,pos_x1,pos_y1) | goto dr_rect
- DrawRoundRectangle(pos_x,pos_y,pos_x1,pos_y1,12,9)
- Must_Redraw=0
- Goto dr_rect
-
- {Ellipse}
- dr_ellipse:
- Current_Fig$ = "&Ellipse"
- Gosub Check_Figure
- If Must_Redraw<>1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,ellipse2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the upper-left corner of the rectangle bounding the ellipse")
- WaitInput()
- ellipse2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,ellipse_end,pos_x1,pos_y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on the lower-right corner of the rectangle bounding the ellipse")
- WaitInput()
- ellipse_end:
- GoSub Draw_Hit_1
- DrawEllipse(pos_x,pos_y,pos_x1,pos_y1)
- Must_Redraw=0
- Goto dr_ellipse
-
- {Pie}
- dr_pie:
- Current_Fig$ = "&Pie"
- Gosub Check_Figure
- If Must_Redraw<>1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,pie2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the upper-left corner of the rectangle bounding the pie's ellipse")
- WaitInput()
- pie2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,pie3,pos_x1,pos_y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on the lower-right corner of the rectangle bounding the pie's ellipse")
- WaitInput()
- pie3:
- GoSub Draw_Hit_1
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,pie4,pos_x2,pos_y2)
- Gosub Draw_Blank
- DrawText(25,136,"(3) Click on one end of the arc that defines the pie")
- WaitInput()
- pie4:
- GoSub Draw_Hit_2
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,pie_end,pos_x3,pos_y3)
- Gosub Draw_Blank
- DrawText(25,136,"(4) Click on the other end of the arc that defines the pie")
- WaitInput()
-
- pie_end:
- GoSub Draw_Hit_3
- DrawPie(pos_x,pos_y,pos_x1,pos_y1,pos_x2,pos_y2,pos_x3,Pos_y3)
- Must_Redraw=0
- Goto dr_pie
-
- {Arc}
- dr_arc:
- Current_Fig$ = "&Arc"
- Gosub Check_Figure
- If Must_Redraw<>1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,arc2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the upper-left corner of the rectangle bounding the arc")
- WaitInput()
- arc2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,arc3,POS_X1,POS_Y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on the lower-right corner of the rectangle bounding the arc")
- WaitInput()
- arc3:
- GoSub Draw_Hit_1
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,arc4,pos_x2,pos_y2)
- Gosub Draw_Blank
- DrawText(25,136,"(3) Click on the arc's start point")
- WaitInput()
- arc4:
- GoSub Draw_Hit_2
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,arc_end,pos_x3,pos_y3)
- Gosub Draw_Blank
- DrawText(25,136,"(4) Click on the arc's end point")
- WaitInput()
-
- arc_end:
- GoSub Draw_Hit_3
- DrawArc(pos_x,pos_y,pos_x1,pos_y1,pos_x2,pos_y2,pos_x3,Pos_y3)
- Must_Redraw=0
- Goto dr_arc
-
- {Chord}
- dr_chord:
- Current_Fig$ = "&Chord"
- Gosub Check_Figure
- If Must_Redraw<>1 Then Goto Move_Hilite
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,chord2,POS_X,POS_Y)
- Gosub Draw_Blank
- DrawText(25,136,"(1) Click on the upper-left corner of the rectangle bounding the chord's ellipse")
- WaitInput()
- chord2:
- GoSub Draw_Hit
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,chord3,pos_x1,pos_y1)
- Gosub Draw_Blank
- DrawText(25,136,"(2) Click on lower-right corner of the rectangle bounding the chord's ellipse")
- WaitInput()
- chord3:
- GoSub Draw_Hit_1
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,chord4,pos_x2,pos_y2)
- Gosub Draw_Blank
- DrawText(25,136,"(3) Click on one point of the line that defines the chord")
- WaitInput()
- chord4:
- GoSub Draw_Hit_2
- SetMouse(0,0,1000,16,Move_Hilite,POS_X,POS_Y,
- 0,16,60000,130,chord_end,pos_x3,pos_y3)
- Gosub Draw_Blank
- DrawText(25,136,"(4) Click on the second point of the line that defines the chord")
- WaitInput()
-
- chord_end:
- GoSub Draw_Hit_3
- DrawChord(pos_x,pos_y,pos_x1,pos_y1,pos_x2,pos_y2,pos_x3,Pos_y3)
- Must_Redraw=0
- Goto dr_chord
-
- {Change Brush Colors}
- BRUSH_WHITE:
- Current_Brush$ = "&White"
- Gosub Check_Brush
- UseBrush(SOLID,255,255,255)
- Br_Red=255
- Br_Green=255
- Br_Blue=255
- Goto Leave_Box
-
- BRUSH_GRAY:
- Current_Brush$ = "&Gray"
- Gosub Check_Brush
- UseBrush(SOLID,192,192,192)
- Br_Red=192
- Br_Green=192
- Br_Blue=192
- Goto Leave_Box
-
- BRUSH_RED:
- Current_Brush$ = "&Red"
- Gosub Check_Brush
- UseBrush(SOLID,255,0,0)
- Br_Red=255
- Br_Green=0
- Br_Blue=0
- Goto Leave_Box
-
- BRUSH_YEL:
- Current_Brush$ = "&Yellow"
- Gosub Check_Brush
- UseBrush(SOLID,255,255,0)
- Br_Red=255
- Br_Green=255
- Br_Blue=0
- Goto Leave_Box
-
- BRUSH_GRN:
- Current_Brush$ = "Gree&n"
- Gosub Check_Brush
- UseBrush(SOLID,0,255,0)
- Br_Red=0
- Br_Green=255
- Br_Blue=0
- Goto Leave_Box
-
- BRUSH_LTBLU:
- Current_Brush$ = "&Light Blue"
- Gosub Check_Brush
- UseBrush(SOLID,0,255,255)
- Br_Red=0
- Br_Green=255
- Br_Blue=255
- Goto Leave_Box
-
- BRUSH_BLUE:
- Current_Brush$ = "&Blue"
- Gosub Check_Brush
- UseBrush(SOLID,0,0,255)
- Br_Red=0
- Br_Green=0
- Br_Blue=255
- Goto Leave_Box
-
- BRUSH_PINK:
- Current_Brush$ = "&Pink"
- Gosub Check_Brush
- UseBrush(SOLID,255,0,255)
- Br_Red=255
- Br_Green=0
- Br_Blue=255
- Goto Leave_Box
-
- BRUSH_Black:
- Current_Brush$ = "Blac&k"
- Gosub Check_Brush
- UseBrush(SOLID,0,0,0)
- Br_Red=0
- Br_Green=0
- Br_Blue=0
- Goto Leave_Box
-
- {Change Pen Colors}
- Pen_White:
- Current_Pen$="&White "
- Gosub Check_Pen
- UsePen(SOLID,2,255,255,255)
- P_Red=255
- P_Green=255
- P_Blue=255
- Goto Leave_Box
-
- Pen_GRAY:
- Current_Pen$="&Gray "
- Gosub Check_Pen
- UsePen(SOLID,2,192,192,192)
- P_Red=192
- P_Green=192
- P_Blue=192
- Goto Leave_Box
-
- Pen_RED:
- Current_Pen$="&Red "
- Gosub Check_Pen
- UsePen(SOLID,2,255,0,0)
- P_Red=255
- P_Green=0
- P_Blue=0
- Goto Leave_Box
-
- Pen_YEL:
- Current_Pen$="&Yellow "
- Gosub Check_Pen
- UsePen(SOLID,2,255,255,0)
- P_Red=255
- P_Green=255
- P_Blue=0
- Goto Leave_Box
-
- Pen_GRN:
- Current_Pen$="Gree&n "
- Gosub Check_Pen
- UsePen(SOLID,2,0,255,0)
- P_Red=0
- P_Green=255
- P_Blue=0
- Goto Leave_Box
-
- Pen_LTBLU:
- Current_Pen$="&Light Blue "
- Gosub Check_Pen
- UsePen(SOLID,2,0,255,255)
- P_Red=0
- P_Green=255
- P_Blue=255
- Goto Leave_Box
-
- Pen_BLUE:
- Current_Pen$="&Blue "
- Gosub Check_Pen
- UsePen(SOLID,2,0,0,255)
- P_Red=0
- P_Green=0
- P_Blue=255
- Goto Leave_Box
-
- Pen_PINK:
- Current_Pen$="&Pink "
- Gosub Check_Pen
- UsePen(SOLID,2,255,0,255)
- P_Red=255
- P_Green=0
- P_Blue=255
- Goto Leave_Box
-
- Pen_Black:
- Current_Pen$="Blac&k "
- Gosub Check_Pen
- UsePen(SOLID,2,0,0,0)
- P_Red=0
- P_Green=0
- P_Blue=0
- Goto Leave_Box
-
- {Subroutine to erase current text}
- Draw_Blank:
- UsePen(NULL,1,0,0,0)
- UseBrush(SOLID,255,255,255)
- DrawRectangle(25,136,250,145)
- UsePen(SOLID,2,P_Red,P_Green,P_Blue)
- UseBrush(SOLID,Br_Red,Br_Green,Br_Blue)
- Return
-
- {Move the highlight to the selected tool}
- Move_Hilite:
- Box_Select_Old = Box_Select
- UseBrush(NULL,0,0,0)
-
- {Erase the old highlight}
- UsePen(SOLID,3,255,255,255) {White pen}
- If Box_Select_Old = 1 Then Gosub Line_Box | Goto New_Hilite
- If Box_Select_Old = 2 Then Gosub Rect_Box | Goto New_Hilite
- If Box_Select_Old = 3 Then Gosub RoundRect_Box | Goto New_Hilite
- If Box_Select_Old = 4 Then Gosub Ellipse_Box | Goto New_Hilite
- If Box_Select_Old = 5 Then Gosub Pie_Box | Goto New_Hilite
- If Box_Select_Old = 6 Then Gosub Arc_Box | Goto New_Hilite
- {Else} Gosub Chord_Box
-
- {Draw the new highlight}
- New_Hilite:
- UsePen(SOLID,3,0,0,0) {Black pen}
- If Must_Redraw <> 1 Then GoSub Key_Hilite
- If POS_X <= 15 Then Box_Select=1 | Gosub Line_Box | Goto Leave_Box
- If POS_X <= 30 Then Box_Select=2 | Gosub Rect_Box | Goto Leave_Box
- If POS_X <= 45 Then Box_Select=3 | Gosub RoundRect_Box | Goto Leave_Box
- If POS_X <= 60 Then Box_Select=4 | Gosub Ellipse_Box | Goto Leave_Box
- If POS_X <= 75 Then Box_Select=5 | Gosub Pie_Box | Goto Leave_Box
- If POS_X <= 90 Then Box_Select=6 | Gosub Arc_Box | Goto Leave_Box
- {Else} Box_Select=7 | Gosub Chord_Box | Goto Leave_Box
-
- Key_Hilite:
- If Current_Fig$="&Line" Then Box_Select=1 | Gosub Line_Box | Goto Leave_Box
- If Current_Fig$="&Rectangle" Then Box_Select=2 | Gosub Rect_Box | Goto Leave_Box
- If Current_Fig$="&Round Rectangle" Then Box_Select=3 | Gosub RoundRect_Box | Goto Leave_Box
- If Current_Fig$="&Ellipse" Then Box_Select=4 | Gosub Ellipse_Box | Goto Leave_Box
- If Current_Fig$="&Pie" Then Box_Select=5 | Gosub Pie_Box | Goto Leave_Box
- If Current_Fig$="&Arc" Then Box_Select=6 | Gosub Arc_Box | Goto Leave_Box
- Box_Select=7 | Gosub Chord_Box
-
- {Rethe brush and pen and branch to the appropriate routine}
- Leave_Box:
- Gosub Draw_Boxes
- If Box_Select = 1 Then Goto Dr_Line
- If Box_Select = 2 Then Goto Dr_Rectangle
- If Box_Select = 3 Then Goto Dr_RoundR
- If Box_Select = 4 Then Goto Dr_Ellipse
- If Box_Select = 5 Then Goto Dr_Pie
- If Box_Select = 6 Then Goto Dr_Arc
- {Else} Goto Dr_Chord
-
- Exit_Proc:
- SetMenu()
- WinGetClientRect("",cx1,cy1,cx2,cy2)
- UseCoordinates(PIXEL)
- DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 0,0,255, TOPBOTTOM)
- UseFont("Arial",15,31,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
- UseBackground(TRANSPARENT,0,0,0)
- DrawTextExt(20,20,400,300,
- "32 bit PiXCL Tools is fully compatible with Windows 95,
- NT 3.51 and NT 4.0",CENTER)
-
- MessageBox(OK,1,INFORMATION,
- "This sample drawing program showed you the capabilities of the
- direct access PiXCL 4.0 has on to your Windows screen, using the
- mouse as the input device.
-
- All the screen draw functions are available to you on a programmed
- basis, this is, without the need for input from the mouse or keyboard.
-
- You can also read input data from files, or transfer ascii data from
- the ClipBoard to your drawing routines.",
- "Graphics Drawing is programable too !",Res)
- End
-
- {Subroutines for highlighting drawing tools}
- Line_Box:
- DrawRectangle(0,0,15,16)
- Return
-
- Rect_Box:
- DrawRectangle(15,0,30,16)
- Return
-
- RoundRect_Box:
- DrawRectangle(30,0,45,16)
- Return
-
- Ellipse_Box:
- DrawRectangle(45,0,60,16)
- Return
-
- Pie_Box:
- DrawRectangle(60,0,75,16)
- Return
-
- Arc_Box:
- DrawRectangle(75,0,90,16)
- Return
-
- Chord_Box:
- DrawRectangle(90,0,105,16)
- Return
-
- {Subroutine: Draw tool boxes}
- Draw_Boxes:
- WinGetClientRect("",cx1,cy1,cx2,cy2)
- UsePen(SOLID,2,0,0,0)
- DrawLine(0,16,1000,16) {Solid line across the window}
- UsePen(SOLID,1,0,0,0) {Lines between drawing tools}
-
- DrawLine(15,0,15,16)
- DrawLine(30,0,30,16)
- DrawLine(45,0,45,16)
- DrawLine(60,0,60,16)
- DrawLine(75,0,75,16)
- DrawLine(90,0,90,16)
- {Reset the pen and brush}
- UsePen(SOLID,2,P_Red,P_Green,P_Blue)
- UseBrush(SOLID,Br_Red,Br_Green,Br_Blue)
- Return
-
- { Check the selected graphic figure }
- Check_Figure:
- StrCmp(Current_Fig$,Previous_Fig$,Must_Redraw)
- ChangeMenuItem(Previous_Fig$,UNCHECK,temp)
- Previous_Fig$=Current_Fig$
- ChangeMenuItem(Current_Fig$,CHECK,temp)
- Return
-
- { Check the selected pen }
- Check_Pen:
- ChangeMenuItem(Previous_Pen$,UNCHECK,temp)
- Previous_Pen$=Current_Pen$
- ChangeMenuItem(Current_Pen$,CHECK,temp)
- Return
-
- { Check the selected brush }
- Check_Brush:
- ChangeMenuItem(Previous_Brush$,UNCHECK,temp)
- Previous_Brush$=Current_Brush$
- ChangeMenuItem(Current_Brush$,CHECK,temp)
- Return
-
- {=== subroutine: draw a ╫ at the mouse hit co-ordinate ===}
- Draw_Hit:
- X = Pos_X Y = Pos_Y - 3
- DrawText(X,Y,"╫")
- Return
-
- Draw_Hit_1:
- X = Pos_X1 Y = Pos_Y1 - 3
- DrawText(X,Y,"╫")
- Return
-
- Draw_Hit_2:
- X = Pos_X2 Y = Pos_Y2 - 3
- DrawText(X,Y,"╫")
- Return
-
- Draw_Hit_3:
- X = Pos_X3 Y = Pos_Y3 - 3
- DrawText(X,Y,"╫")
- Return
-
-
-